﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;

namespace AddonService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ITestService" in both code and config file together.
    
    [ServiceContract]
    public interface ITestService
    {
        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "/test")]
        string Test();

        [OperationContract]
        [WebInvoke(Method="POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/testPost")]
        string TestPost(TestClass obj);

        [OperationContract]
        [WebInvoke(Method = "DELETE", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/testDelete/{id}")]
        string TestDelete(string id);

    }

    public class TestClass
    {
        public string id {get; set;}
    }
}
